import numpy as np
from pytracking.evaluation.data import Sequence, BaseDataset, SequenceList
from pytracking.utils.load_text import load_text
import os

class EOTBDataset(BaseDataset):
    """ OTB-2015 dataset

    Publication:
        Object Tracking Benchmark
        Wu, Yi, Jongwoo Lim, and Ming-hsuan Yan
        TPAMI, 2015
        http://faculty.ucmerced.edu/mhyang/papers/pami15_tracking_benchmark.pdf

    Download the dataset from http://cvlab.hanyang.ac.kr/tracker_benchmark/index.html
    """

    def __init__(self, split = 'test', groupnum = 5):
        super().__init__()
        self.split = split
        self.groupnum = groupnum
        self.base_path = self.env_settings.fe108_dir
        self.sequence_info_list = self._get_sequence_info_list()
        

    def get_sequence_list(self):
        return SequenceList([self._construct_sequence(s) for s in self.sequence_info_list])

    def _construct_sequence(self, sequence_info):
        sequence_path = sequence_info['path']
        nz = sequence_info['nz']
        ext = sequence_info['ext']
        start_frame = sequence_info['startFrame']
        end_frame = sequence_info['endFrame']

        init_omit = 0
        if 'initOmit' in sequence_info:
            init_omit = sequence_info['initOmit']

        if self.split == 'origin' or self.split == 'train':
            frames = ['{base_path}/{sequence_path}/{frame:0{nz}}.{ext}'.format(base_path=self.base_path,
                                                                            sequence_path=sequence_path, frame=frame_num,
                                                                            nz=nz, ext=ext) for frame_num in
                    range(start_frame + init_omit, end_frame)]
        elif self.split == 'val' or self.split == 'test':  
            frames = []
            assert end_frame % self.groupnum == 0
            for frame_num in range(start_frame + init_omit, int(end_frame/5)):
                for i in range(self.groupnum):
                    file_path = f"{self.base_path}/{sequence_path}/{frame_num}_{i}.{ext}"
                    frames.append(file_path)

        anno_path = '{}/{}'.format(self.base_path, sequence_info['anno_path'])

        # NOTE: OTB has some weird annos which panda cannot handle
        ground_truth_rect = load_text(str(anno_path), delimiter=(',', None), dtype=np.float64, backend='numpy')

        return Sequence(sequence_info['name'], frames, 'eotb', ground_truth_rect[init_omit:, :],
                        object_class=sequence_info['object_class'])

    def __len__(self):
        return len(self.sequence_info_list)

    def _get_sequence_info_list(self):
        sequence_info_list = []
        if self.split == 'origin':
            test_list = [f.strip() for f in open(f'{self.base_path}/train_tracker.txt', 'r').readlines()]
            for seq_name in test_list:
                seq_info = {'anno_path': f'test/{seq_name}/groundtruth_rect.txt',
                            'endFrame': len([f for f in os.listdir(f'{self.base_path}/test/{seq_name}/event_frame/groupnum_1') if f.endswith('.npy')]),
                            'ext': 'npy',
                            'name': seq_name,
                            'nz': 0,
                            'object_class': 'object',
                            'path': f'test/{seq_name}/event_frame/groupnum_1',
                            'startFrame': 0}
                sequence_info_list.append(seq_info)
        elif self.split == 'train':
            train_list = [f.strip() for f in open(f'{self.base_path}/train_tracker.txt', 'r').readlines()]
            for seq_name in train_list:
                seq_info = {'anno_path': f'train/{seq_name}/groundtruth_rect.txt',
                            'endFrame': len([f for f in os.listdir(f'{self.base_path}/train/{seq_name}/event_frame/groupnum_1') if f.endswith('.npy')]),
                            'ext': 'npy',
                            'name': seq_name,
                            'nz': 0,
                            'object_class': 'object',
                            'path': f'train/{seq_name}/event_frame/groupnum_1',
                            'startFrame': 0}
                sequence_info_list.append(seq_info)

        elif self.split == 'test':
            test_list = [f.strip() for f in open(f'{self.base_path}/test.txt', 'r').readlines()]
            for seq_name in test_list:
                seq_info = {
                            'anno_path': f'test/{seq_name}/groundtruth_rect_{self.groupnum}_linear.txt',
                            'endFrame': len([f for f in os.listdir(f'{self.base_path}/test/{seq_name}/event_frame/groupnum_{self.groupnum}') if f.endswith('.npy')]),
                            'ext': 'npy',
                            'name': seq_name,
                            'nz': 0,
                            'object_class': 'object',
                            'path': f'test/{seq_name}/event_frame/groupnum_{self.groupnum}',
                            'startFrame': 0}
                sequence_info_list.append(seq_info)

        elif self.split == 'val':
            test_list = [f.strip() for f in open(f'{self.base_path}/val_all.txt', 'r').readlines()]
            for seq_name in test_list:
                seq_info = {'anno_path': f'train/{seq_name}/groundtruth_rect_{self.groupnum}_repeat.txt',
                            'endFrame': len([f for f in os.listdir(f'{self.base_path}/train/{seq_name}/event_frame/groupnum_{self.groupnum}') if f.endswith('.npy')]),
                            'ext': 'npy',
                            'name': seq_name,
                            'nz': 0,
                            'object_class': 'object',
                            'path': f'train/{seq_name}/event_frame/groupnum_{self.groupnum}',
                            'startFrame': 0}
                sequence_info_list.append(seq_info)


        return sequence_info_list

#     def _get_sequence_info_list(self):
#         sequence_info_list = [   {'anno_path': 'airplane_mul222_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'airplane_mul222_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'airplane_mul222_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'airplane_mul222_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'airplane_mul222_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'airplane_mul222_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'ball333_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'ball333_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'ball333_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'ball333_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'ball333_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'ball333_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'box_hdr_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'box_hdr_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'box_hdr_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'box_hdr_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'box_hdr_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'box_hdr_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'box_illu_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'box_illu_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'box_illu_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'box_illu_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'box_illu_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'box_illu_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'box_low_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'box_low_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'box_low_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'box_low_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'box_low_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'box_low_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'cup222_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'cup222_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cup222_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'cup222_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'cup222_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cup222_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'cup_low_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'cup_low_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cup_low_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'cup_low_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'cup_low_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cup_low_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'dog_20fps_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'dog_20fps_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'dog_20fps_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'dog_20fps_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'dog_20fps_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'dog_20fps_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'dog_motion_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'dog_motion_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'dog_motion_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'dog_motion_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'dog_motion_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'dog_motion_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'dove_mul222_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'dove_mul222_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'dove_mul222_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'dove_mul222_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'dove_mul222_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'dove_mul222_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'elephant_severe_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'elephant_severe_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'elephant_severe_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'elephant_severe_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'elephant_severe_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'elephant_severe_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'elephant222_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'elephant222_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'elephant222_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'elephant222_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'elephant222_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'elephant222_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'giraffe222_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'giraffe222_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'giraffe222_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'giraffe222_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'giraffe222_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'giraffe222_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'giraffe_low_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'giraffe_low_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'giraffe_low_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'giraffe_low_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'giraffe_low_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'giraffe_low_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'ship_20fps_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'ship_20fps_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'ship_20fps_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'ship_20fps_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'ship_20fps_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'ship_20fps_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'ship_motion_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'ship_motion_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'ship_motion_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'ship_motion_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'ship_motion_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'ship_motion_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'star_20fps_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'star_20fps_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'star_20fps_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'star_20fps_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'star_20fps_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'star_20fps_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'star_motion_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'star_motion_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'star_motion_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'star_motion_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'star_motion_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'star_motion_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'star_mul222_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'star_mul222_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'star_mul222_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'star_mul222_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'star_mul222_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'star_mul222_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'tank_low_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'tank_low_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'tank_low_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'tank_low_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'tank_low_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'tank_low_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'tank_low_2/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'tank_low_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'tank_low_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'tower_20fps_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'tower_20fps_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'tower_20fps_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'tower_20fps_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'tower_20fps_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'tower_20fps_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'truck_20fps_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'truck_20fps_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'truck_20fps_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'truck_20fps_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'truck_20fps_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'truck_20fps_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'whale_mul222_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'whale_mul222_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'whale_mul222_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'whale_mul222_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'whale_mul222_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'whale_mul222_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'box_sim_obj_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'box_sim_obj_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'box_sim_obj_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'box_sim_obj_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'box_sim_obj_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'box_sim_obj_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'box_sim_obj_2/groundtruth_rect.txt',
# 'endFrame': 2274,
# 'ext': 'jpg',
# 'name': 'box_sim_obj_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'box_sim_obj_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'cone_sim_obj_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'cone_sim_obj_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cone_sim_obj_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'cone_sim_obj_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'cone_sim_obj_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cone_sim_obj_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'cone_sim_obj_2/groundtruth_rect.txt',
# 'endFrame': 2274,
# 'ext': 'jpg',
# 'name': 'cone_sim_obj_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cone_sim_obj_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'bottle_static_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'bottle_static_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'bottle_static_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'bottle_static_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'bottle_static_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'bottle_static_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'bottle_static_2/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'bottle_static_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'bottle_static_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'cow_illu_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'cow_illu_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cow_illu_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'cow_illu_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'cow_illu_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cow_illu_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'cow_illu_2/groundtruth_rect.txt',
# 'endFrame': 2274,
# 'ext': 'jpg',
# 'name': 'cow_illu_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cow_illu_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'giraffe_illu_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'giraffe_illu_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'giraffe_illu_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'giraffe_illu_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'giraffe_illu_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'giraffe_illu_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'giraffe_illu_2/groundtruth_rect.txt',
# 'endFrame': 2274,
# 'ext': 'jpg',
# 'name': 'giraffe_illu_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'giraffe_illu_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'star_illu_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'star_illu_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'star_illu_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'star_illu_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'star_illu_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'star_illu_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'star_illu_2/groundtruth_rect.txt',
# 'endFrame': 2274,
# 'ext': 'jpg',
# 'name': 'star_illu_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'star_illu_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'ship_static_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'ship_static_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'ship_static_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'ship_static_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'ship_static_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'ship_static_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'ship_static_2/groundtruth_rect.txt',
# 'endFrame': 2274,
# 'ext': 'jpg',
# 'name': 'ship_static_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'ship_static_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'turtle_texture_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'turtle_texture_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'turtle_texture_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'turtle_texture_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'turtle_texture_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'turtle_texture_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'turtle_texture_2/groundtruth_rect.txt',
# 'endFrame': 2274,
# 'ext': 'jpg',
# 'name': 'turtle_texture_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'turtle_texture_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'cow_texture_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'cow_texture_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cow_texture_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'cow_texture_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'cow_texture_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cow_texture_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'cow_texture_2/groundtruth_rect.txt',
# 'endFrame': 2274,
# 'ext': 'jpg',
# 'name': 'cow_texture_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'cow_texture_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'dove_severe_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'dove_severe_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'dove_severe_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'dove_severe_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'dove_severe_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'dove_severe_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'dove_severe_2/groundtruth_rect.txt',
# 'endFrame': 2274,
# 'ext': 'jpg',
# 'name': 'dove_severe_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'dove_severe_2/stack240',
# 'startFrame': 1},
# {'anno_path': 'fighter_severe_0/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'fighter_severe_0',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'fighter_severe_0/stack240',
# 'startFrame': 1},
# {'anno_path': 'fighter_severe_1/groundtruth_rect.txt',
# 'endFrame': 3360,
# 'ext': 'jpg',
# 'name': 'fighter_severe_1',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'fighter_severe_1/stack240',
# 'startFrame': 1},
# {'anno_path': 'fighter_severe_2/groundtruth_rect.txt',
# 'endFrame': 1674,
# 'ext': 'jpg',
# 'name': 'fighter_severe_2',
# 'nz': 5,
# 'object_class': 'object',
# 'path': 'fighter_severe_2/stack240',
# 'startFrame': 1},           ]
#         return sequence_info_list
